package com.itheima.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

// 声明该类为spring配置类
@Configuration
// 扫描该路径下的注解
@ComponentScan({"com.itheima.service"})
// 读取配置文件
@PropertySource("classpath:jdbc.properties")
// 导入其他配置类
@Import({JdbcConfig.class,MybatisConfig.class})
// 开启事务
@EnableTransactionManagement
public class SpringConfig {
}
